package com.example.zjx8969.myapplication.database;

import androidx.room.Embedded;
import androidx.room.Entity;
import androidx.room.PrimaryKey;
import androidx.annotation.NonNull;

import java.util.Locale;

@Entity(/*tableName = "user", indices = {@Index(value = "uid", unique = true)}*/)
public class User {
    @PrimaryKey
    @NonNull
    public String uid;
    public String name;
    public String avatar;
    @Embedded
    public Address address;

    public String lang = Locale.getDefault().getCountry();


    @Override
    public String toString() {
        return "User{" +
                "uid='" + uid + '\'' +
                ", name='" + name + '\'' +
                ", avatar='" + avatar + '\'' +
                ", address=" + address +
                ", lang='" + lang + '\'' +
                '}';
    }
}
